From: Florian Müllner Date: Wed, 29 May 2019 15:20:23 +0000 (+0200) Subject: windowManager: Disable favorite shortcuts without overview X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~845^2^2~169 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=866629b3d3a2dc108e581e1dffb7fff59fed65ba;p=gnome-shell.git windowManager: Disable favorite shortcuts without overview The `switch-to-application-n` shortcuts are essentially "launch the nth app in the dash" actions, so they are at the very least confusing when the dash isn't available because the overview itself is disabled (for example in initial-setup mode). So disable the shortcuts when the overview is disabled, but delegate the decision to a separate function so that extensions like 'panel-favorites' which expose favorites by some other means can easily re-enable them. https://gitlab.gnome.org/GNOME/gnome-shell/issues/1333 --- diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js index 1ab99fcdd..1d94e1583 100644 --- a/js/ui/windowManager.js +++ b/js/ui/windowManager.js @@ -2121,7 +2121,14 @@ var WindowManager = class { Main.ctrlAltTabManager.popup(binding.is_reversed(), binding.get_name(), binding.get_mask()); } + _allowFavoriteShortcuts() { + return Main.sessionMode.hasOverview; + } + _switchToApplication(display, window, binding) { + if (!this._allowFavoriteShortcuts()) + return; + let [,,,target] = binding.get_name().split('-'); let apps = AppFavorites.getAppFavorites().getFavorites(); let app = apps[target - 1];